<?php

/**
 * ProductCategory form.
 *
 * @package    product
 * @subpackage form
 * @author     Your name here
 * @version    SVN: $Id: sfPropelFormTemplate.php 10377 2008-07-21 07:10:32Z dwhittle $
 */
class ProductCategoryForm extends BaseProductCategoryForm
{
  public function configure()
  {
  	unset($this->widgetSchema['id']);
  	$this->widgetSchema['depth'] = new sfWidgetFormInputHidden();
  	$this->widgetSchema['fid'] = new sfWidgetFormInputHidden();  	
  	$this->widgetSchema['ison'] = new sfWidgetFormChoice(array('choices'=>array('不显示','显示')));
  	$this->widgetSchema->setLabels(array(
	  'title'    => '名称',
	  'orders' => '排序',
	  'ison' => '显示与否',
	));
	$this->widgetSchema->setNameFormat('cate[%s]');
	//$this->widgetSchema->setFormFormatterName('list');
	$this->setValidator('title',new sfValidatorString(array('required' => '分类标题必须填写')));
  }
}
